#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>

int main(int argc, char *argv[])
{
	pid_t pid;
	if((pid = fork()) < 0) {
		printf("create process error\n");
	}
	else if(pid == 0) {
		printf("child pid:\t%d\n", getpid());
		execl("/bin/ls", "ls", "-l", "/home", (char*)0);
	}
	else{
		printf("father OK!\n");
		printf("father pid:\t%d\n", getpid());
	}
	return 0;
}
